<template>
  <div class="houseInfo">
    <div style="background-color: white">
      <base-search :formItemList="formItemList" @search="searchFrom">
      </base-search>

      <table-custom
        :data="tableData"
        :header="dailyHeader"
        :settings="tableSettings"
        @currentPage="currentPage"
        @pageSize="pageSize"
        style="margin-top: 20px"
      >
        <!-- //自定义操作列插槽 -->
        <template slot="xiaoquzhuangtai">
          <el-table-column prop="xiaoquzhuangtai" label="校区状态">
            <template slot-scope="scope">
              <div><img src="kkk" />{{ scope.row.xiaoquzhuangtai }}</div>
            </template>
          </el-table-column>
        </template>
        <template slot="action">
          <el-table-column
            label="操作"
            align="left"
            width="120px"
            fixed="right"
          >
            <template slot-scope="scope">
              <el-button type="text" @click="handleshow(scope.row, 'edit')"
                >编辑</el-button
              >
              <el-button type="text" @click="handleshow(scope.row, 'del')"
                >删除</el-button
              >
            </template>
          </el-table-column>
        </template>
      </table-custom>
 
    </div>
  </div>
</template>
<script>
// import tableCustom from "@/components/common/tableCustom/index.vue";
// import baseSearch from "@/components/common/searchCustom/index.vue";
import { tableTile, floorHeader } from "./tableTitle";
export default {
//   components: { tableCustom, baseSearch },
  name: "houseInfo",
  data() {
    return {
 
      formItemList: [
        //搜索条件
        {
          label: "楼宇名称",
          type: "input",
          param: "company1",
        },
        {
          label: "所属校区",
          type: "select",
          selectOptions: [{ text: "全部", value: "全部" }],
          param: "company11",
        },
        {
          label: "楼宇状态",
          type: "select",
          selectOptions: [{ text: "全部", value: "全部" }],
          param: "company22",
        },
      ],
      tableSettings: {
        isPagination: false,
        isLoading: false,
        total: 0,
        isIndex: false,
        isBorder: false,
        height: 500,
      },
      loadingBottom: false,
      dailyHeader: tableTile,
      floorHeader: floorHeader,

      tableData: {
        list: [
          {
            xiaoqumingcheng: "校区",
            louyudaima: "20230908",
            xiaoquzhuangtai: "1",
          },
        ],
      },
      obj: {
        pageNum: 1,
        pageSize: 20,
      },
      //弹框 start
      dialogVisible: false,
      titles: "新增",
      formObj: {
        louyudaima: "",
        xianshipaixu: "",
        xiaoqumingcheng: "",
        xiaoquzhuangtai: "0",
        louyumingcheng: "",
        dishang: 0,
        dixia: 0,
        floorList: {
          list: [],
        },
      },
      dixiaList: [],
      dixiaList: [],

      // 弹框   end
    };
  },
  created() {},
  mounted() {},
  methods: {
    handleAdd() {
      this.titles = "新增";
      this.dialogVisible = true;
      this.$refs.buildingFormRef && this.$refs.buildingFormRef.resetFields();
    },
    //搜索
    searchFrom(res) {
      console.log(res, "搜索");
    },
    inittable() {},
    currentPage(page) {
      this.obj.pageNum = page;
      this.inittable();
    },
    pageSize(size) {
      this.obj.pageSize = size;
      this.inittable();
    },
    //列表操作
    handleshow(row, type) {
      if (type === "edit") {
        this.titles = "编辑";
        this.dialogVisible = true;
      }
      if (type === "del") {
      }
    },
  },
};
</script>

<style lang="scss" scoped>
.houseInfo {
  width: calc(100% - 40px);
  height: calc(100% - 40px);
  padding: 20px 20px 20px 20px;
  .application-box {
    margin-top: 16px;
    //巡逻迭代图
    .right-area {
      height: 400px;
      position: relative;
    }
  }
  //标题
  .top-title {
    margin-bottom: 16px;
    font-size: 20px;
    font-family: RZRXNFHJ;
    font-weight: 500;
    color: #1f2329;
  }

  .dialog-d1 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
  }
  .dialog-d1-l {
    width: 50%;
    /deep/.div-el-input,
    .el-textarea {
      width: 70%;
    }
    /deep/.el-select {
      width: 70%;
    }
    /deep/.el-input-number {
      width: 70%;
    }
  }
  .btn-search {
    width: auto;
  }
}
</style>
